/**
 * JAVACC DEMO 1.0
 */
package com.apache.portal.thread;

import com.apache.excp.core.impl.LoadManager;
import com.apache.excp.core.manager.ExportExecl;
import com.apache.excp.core.model.ExportVo;

import java.util.concurrent.Callable;

/**
 * description: 导出任务线程类
 *
 * @author qihan 创建时间：2017-9-14
 */
public class WordoutTask implements Callable<Integer> {

    private ExportVo vo;

    public WordoutTask(ExportVo vo) {
        this.vo = vo;
    }

    /**
     * TODO 简单描述该方法的实现功能（可选）.
     *
     * @see Callable#call()
     */
    public Integer call() throws Exception {
        int count = 1;
        try {
            ExportExecl word = LoadManager.getInstance().getExpWord();
            vo.setParams("k1", "kkkkkkk111111");
            vo.setParams("k2", "kkkkkkk222222");
            vo.setParams("k3", "kkkkkkk333333");
            vo.setParams("k4", "kkkkkkk444444");
            vo.setParams("k5", "kkkkkkk555555");
            vo.setParams("k6", "kkkkkkk6666666");
            word.exportData(vo);//downloadFile
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
        return count;
    }


}
